<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<!-- base href="http://localhost:8080/MyCommunity/" -->
    <title>首页：欢迎光临XDA论坛</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="Content/bootstrap/css/bootstrap.css" rel="stylesheet" media="screen">
    <!-- Custom CSS -->
    <link href="Content/css/main.css" rel="stylesheet">
    <script src="Content/script/jquery-1.10.2.js"></script>
</head>
<body>
    <div class="container">
  		<%@ include file="/shared/header.jsp" %>
    
    	<div class="content">
        	


<div class="row">
    <div class="col-lg-6">
		<div id="banner" class="carousel slide" data-ride="carousel">
			<!-- Indicators -->
			<ol class="carousel-indicators">
				<li class="active" data-target="#banner" data-slide-to="0"></li>
				<li class="" data-target="#banner" data-slide-to="1"></li>
				<li class="" data-target="#banner" data-slide-to="2"></li>
				<li data-target="#banner" data-slide-to="3" class="">&nbsp;</li>
			</ol>
			<!-- Wrapper for slides -->
			<div class="carousel-inner">
				<div class="item active">
                    <img src="Content/pictures/banner/okwu.jpg" alt="OKWU.edu Homepage">
                    <div class="carousel-caption">广告图片0001</div>
                </div>
                <div class="item">
                    <img src="Content/pictures/banner/okwu-athletics.jpg" alt="OKWU Athletics Homepage">
                    <div class="carousel-caption">广告图片0002</div>
                </div>
                <div class="item">
                    <img src="Content/pictures/banner/bartlesvillecf.jpg" alt="Bartlesville Community Foundation">
                    <div class="carousel-caption">广告图片0003</div>
                </div>
                <div class="item">
                    <img src="Content/pictures/banner/emancipation.jpg" alt="Emancipation Stories">
                    <div class="carousel-caption">广告图片0004</div>
                </div>
			</div>
			<!-- Controls -->
			<a class="left carousel-control" href="#banner" data-slide="prev"> 
				<span class="glyphicon glyphicon-chevron-left"></span> 
			</a> 
			<a class="right carousel-control" href="#banner" data-slide="next"> 
				<span class="glyphicon glyphicon-chevron-right"></span> 
			</a>
		</div>
	</div>
	
    <div class="col-md-6">
        <h4><strong>正在讨论</strong></h4>
        <ul class="list-group">
           <c:forEach items="${topic }" var="t">
           <li class="list-group-item">
          	<span class="badge">回复：${t.commentTimes }</span>
          	<a href="CommentServlet?referenceId=${t.id }">${t.title }</a>
          </li>
           </c:forEach>
        </ul>
    </div>
</div>



<c:forEach items="${forum }" var = "f"> 
<div class="row">
    <div class="col-lg-12">
        <div class="panel panel-default">
          <div class="panel-heading">${f.name }</div>
        </div>
    </div>
</div>

<div class="row">
    <c:forEach items="${f.children}" var="forum" varStatus="vs">
    <div class="col-md-3">
       <div class="thumbnail">
          <img src="Content/pictures/forum/forum_${vs.index+3 }_icon.png" alt="">
          <h3 class="text-center"><a href="ForumServlet?forumId=${forum.id }&username=${username}">${forum.name }</a></h3>
          <p>${forum.description }</p>
        </div>
    </div>
    </c:forEach>

</div>
</c:forEach>
    	</div>
    
		
<%@ include file="/shared/footer.jsp" %>

    </div>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="Content/bootstrap/js/bootstrap.js"></script>

</body></html>